// JavaScript Document
window.onload = window.onresize = function() {
    var sWidth = document.body.clientWidth;
    var sHeight = document.body.clientHeight;

    var hr = document.getElementById("header");
    var ts = document.getElementById("tools");
    var tblMain = document.getElementById("tbl_main");
    var divContent = document.getElementById("divContent");
    var menu = document.getElementById("menu");
    var menuTitle = document.getElementById("menu_title");
    var menuMain = document.getElementById("menu_main");
    var iframe = document.getElementById("iframemain");
    var tdmain = document.getElementById("td_main");

    var mainHeight = sHeight - hr.offsetHeight - ts.offsetHeight - 2;
    var mainWidth = sWidth - document.getElementById("td_nav").offsetWidth - document.getElementById("td_splitter").offsetWidth - 2;
    var menuMainHeight = mainHeight - menuTitle.offsetHeight;

    //msgInfo(mainWidth);
    $(iframe).width(mainWidth);
    $(iframe).height(mainHeight);
    $(divContent).width(mainWidth);
    $(divContent).height(mainHeight);
    $(menuMain).height(menuMainHeight);
    $(menu).height(mainHeight);
    $(tdmain).width(mainWidth);
    $(tblMain).width(sWidth);
    $(tblMain).height(mainHeight);
}
	
function menu_righton(){ 
	var left=document.getElementById("menuleft");
	var right=document.getElementById("menuright");
	var m2=document.getElementById("menu_main1");
	var m1=document.getElementById("menu_main");
	left.className = "menuleft_off" + " " + "menuleft" ;
	right.className = "menuright_on" + " " + "menuright" ;
	m1.style.display = "none" ;
	m2.style.display = "block" ;
	
}
function menu_lefton(){ 
	var left=document.getElementById("menuleft");
	var right=document.getElementById("menuright");
	var m2=document.getElementById("menu_main1");
	var m1=document.getElementById("menu_main");
	left.className = "menuleft" ;
	right.className = "menuright" ;
	m1.style.display = "block" ;
	m2.style.display = "none" ;
	
	
}
function menu_on(){ 
	var menudiv = document.getElementById("menu");
	var menudiv01 = document.getElementById("menu01");
	menudiv.style.display = "block" ;
	//menudiv01.style.display = "none" ;
	menudiv01.style.visibility = "hidden" ;
	
}
function menu_off(){ 
	var menudiv=document.getElementById("menu");
	var menudiv01=document.getElementById("menu01");
	menudiv.style.display = "none" ;
	//menudiv01.style.display = "block" ;
	menudiv01.style.visibility = "visible" ;
	
}